//
//  DetailViewController.m
//  PeekAndPop
//
//  Created by midea on 16/2/16.
//  Copyright © 2016年 Vincent. All rights reserved.
//

#import "DetailViewController.h"

@interface DetailViewController ()<UIWebViewDelegate>

@end

@implementation DetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor greenColor];
    
    UIWebView *imageview = [[UIWebView alloc] initWithFrame:self.view.bounds];
    [self.view addSubview:imageview];
    imageview.backgroundColor = [UIColor orangeColor];
    NSURL *url = [NSURL URLWithString:@"http://www.baidu.com"];
    NSURLRequest *request = [NSURLRequest requestWithURL:url];
    imageview.delegate = self;
    [imageview loadRequest:request];
    
}

- (NSArray<id<UIPreviewActionItem>> *)previewActionItems {
    
    UIPreviewAction *action1 = [UIPreviewAction actionWithTitle:@"UIPreviewAction" style:UIPreviewActionStyleDestructive handler:^(UIPreviewAction * _Nonnull action, UIViewController * _Nonnull previewViewController) {
        NSLog(@"click");
    }];

    NSArray *actions = @[action1];
    
    return actions;
}

@end
